#include <assert.h>
#include "acaccountao_factory.h"
#include "acaccountao_stub4web.h"
#include "acaccountao_stub4app.h"
//#include "acaccountao.h"

using namespace erp::acaccount::ao;

bool CACAccountAoFactory::s_ACAccountAoInit = false;

IACAccountAo* CACAccountAoFactory::GetObject(enum ObjType_T obj_type)
{
    switch(obj_type)
    {
    case STUB4APP:
        return (new CACAccountAoStub4App);
/*适应container3
    case POCO:
    {
        if(!s_ACAccountAoInit)
        {
            int iRetCode = CACAccountAo::Initialize();
            assert(iRetCode == 0);
            s_ACAccountAoInit = true;
        }   	
        return (new CACAccountAo);
	}*/
    default:
        assert(0);
    };
    return NULL;
}

IACAccountAoAsyc* CACAccountAoFactory::GetAsycObject()
{
	return (new CACAccountAoStub4App);
}
